package com.mrobuy.jdvc.entity;

import com.gavel.annotation.FieldMeta;
import com.gavel.annotation.TableMeta;
import com.gavel.database.SQLExecutor;

import java.util.List;

@TableMeta(name = "VC_CATEGORY_EXTPROP", title = "京东类目扩展属性")
public class VCCategoryExtProp {

    @FieldMeta(name = "ID", title = "ID", length = 32, primary = true)
    private String id;

    @FieldMeta(name = "CID", title = "类目ID", length = 32)
    private String cid;

    @FieldMeta(name = "ATTID", title = "属性id", length = 32)
    private String attId;

    @FieldMeta(name = "NAME", title = "属性名称", length = 20)
    private String name;  //

    @FieldMeta(name = "TYPE", title = "类型", length = 20)
    private String type;  // 数值/文本内容/单选备注

    @FieldMeta(name = "ORDERSORT", title = "排序标记", length = 20)
    private String orderSort;

    @FieldMeta(name = "ISREQUIRED", title = "是否必填", length = 8)
    private String isRequired;  // isRequired : 1

    @FieldMeta(name = "YN", title = "是否有效", length = 8)
    private String yn;  // "inputType": 3,

    @FieldMeta(name = "INPUTTYPE", title = "值类型", length = 8)
    private String inputType;  //"（1:单选，2:复选，3:文本， 4:时间年，5:时间月，6:时间日，7:数值 ,jos自定义值(老逻辑展现形式) 8:单选 + 文本）": "",

    @FieldMeta(name = "VALUNIT", title = "属性值单位", length = 20)
    private String valunit;  // "valUnit": "",

    @FieldMeta(name = "ATTRALIAS", title = "属性值别名", length = 20)
    private String attrAlias;  // "0：无，1：有	属性值别名

    @FieldMeta(name = "MAINTAINREMARK", title = "维护备注/示例", length = 20)
    private String maintainRemark;  // "maintainRemark": "",

    private List<VCExtPropValue> options;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getAttId() {
        return attId;
    }

    public void setAttId(String attId) {
        this.attId = attId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getOrderSort() {
        return orderSort;
    }

    public void setOrderSort(String orderSort) {
        this.orderSort = orderSort;
    }

    public String getIsRequired() {
        return isRequired;
    }

    public void setIsRequired(String isRequired) {
        this.isRequired = isRequired;
    }

    public String getYn() {
        return yn;
    }

    public void setYn(String yn) {
        this.yn = yn;
    }

    public String getInputType() {
        return inputType;
    }

    public void setInputType(String inputType) {
        this.inputType = inputType;
    }

    public String getValunit() {
        return valunit;
    }

    public void setValunit(String valunit) {
        this.valunit = valunit;
    }

    public String getAttrAlias() {
        return attrAlias;
    }

    public void setAttrAlias(String attrAlias) {
        this.attrAlias = attrAlias;
    }

    public String getMaintainRemark() {
        return maintainRemark;
    }

    public void setMaintainRemark(String maintainRemark) {
        this.maintainRemark = maintainRemark;
    }

    public List<VCExtPropValue> getOptions() {
        return options;
    }

    public void setOptions(List<VCExtPropValue> options) {
        this.options = options;
    }

    @Override
    public String toString() {
        return "VCCategoryExtProp{" +
                "id='" + id + '\'' +
                ", cid='" + cid + '\'' +
                ", attId='" + attId + '\'' +
                ", name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", orderSort='" + orderSort + '\'' +
                ", isRequired='" + isRequired + '\'' +
                ", yn='" + yn + '\'' +
                ", inputType='" + inputType + '\'' +
                ", valunit='" + valunit + '\'' +
                ", attrAlias='" + attrAlias + '\'' +
                ", maintainRemark='" + maintainRemark + '\'' +
                '}';
    }

    public static void main(String[] args) throws Exception {
        SQLExecutor.createTable(VCCategoryExtProp.class);
    }
}
